package com.hm.ibsm.auto;

import java.util.ArrayList;
import java.util.List;

import org.springframework.boot.context.properties.ConfigurationProperties;

import lombok.Data;

/**
 * @author shishun.wang
 * @date 下午3:51:27 2017年2月2日
 * @version 1.0
 * @describe
 */
@Data
@ConfigurationProperties(prefix = "com.hm.ibsm.manage")
public class ManageProperties {

	private RedisConfig redisConfig = new RedisConfig();

	private Author author = new Author();

	@Data
	public class RedisConfig {

		private String sequenceNumberKey;
		
		/**
		 * 设定前端请求时间间隔(防止后端数据业务处理中,前端频繁提交数据,如活动,抢单,抢购等)
		 */
		private long requestLockTimeOut;
		
		/**
		 * 开启前端请求锁
		 */
		private boolean openRequestLock;
	}

	@Data
	public class Author {

		private boolean singlePoint;

		private long tokenValidTime;

		private boolean devAuthEnable;

		private List<String> whiteList = new ArrayList<String>();

	}
}
